/*
{
	"statusCode":"200",
	"message":"操作成功",
	"navTabId":"main",
	"callbackType":"closeCurrent",
	"forwardUrl":""
}
 */
package cn.com.yinhex.util;

import org.json.JSONObject;

public class Dwz {

	public static String status_success = "200";
	public static String status_error = "300";

	JSONObject json = new JSONObject();

	public Dwz() {
		try {
			json.put("statusCode", "200");
			json.put("message", "操作成功");
			json.put("navTabId", "unknown");
			json.put("callbackType", "");
			json.put("callbackExec", "");
			json.put("forwardUrl", "");
		} catch (Exception e) {
		}
	}

	public void put(String key, String value) {
		try {
			json.put(key, value);
		} catch (Exception e) {
		}
	}

	public void putSuccess(String message) {
		try {
			json.put("statusCode", status_success);
			json.put("message", message);
		} catch (Exception e) {
		}
	}

	public void putError(String message) {
		try {
			json.put("statusCode", status_error);
			json.put("message", message);
		} catch (Exception e) {
		}
	}

	public String toString() {
		return json.toString();
	}
	
}